local m = require('utils.color')
local hl = vim.api.nvim_set_hl

local M = {}
M.set_it = function()

    hl(0,"Normal",{ bg = m.bg, fg = m.fg})
    hl(0,"NormalNC",{ bg = m.bg, fg = m.fg})

    hl(0,"TelescopePromptNormal",{ fg = m.fg, bg = m.bg })
    hl(0,"TelescopePromptPrefix",{ fg = m.fg, bg = m.bg })
    hl(0,"TelescopePromptTitle",{ fg = m.red })
    hl(0,"TelescopePreviewDirectory",{ fg = m.fg_path})

    hl(0,"TelescopePreviewNormal",{ fg = m.fg_path})

    hl(0,"TelescopeSelection",{bg = m.bg_cursorline})
    hl(0,"TelescopeMultiSelection",{bg = m.bg})
    hl(0,"TelescopeBorder",{bg = m.bg_cursorline, fg = m.bg_cursorline})
    hl(0,"TelescopeResultsTitle",{bg = m.bg_cursorline, fg = m.red})
    hl(0,"TelescopeMatching",{bg = m.bg_search, fg = m.fg_search, reverse = true})

    hl(0,"VertSplit",{bg = m.bg, fg = m.bg_cursorline})
    hl(0,"StatusLineNC",{bg = m.bg, fg = m.bg_cursorline}) -- HorizontalSplit
    hl(0,"StatusLine",{bg = m.bg, fg = m.bg_cursorline}) -- HorizontalSplit
    hl(0,"Tabline", {bg = m.bg_cursorline ,fg = m.bg_cursorline}) -- use FloatBorder:Tabline

    hl(0,"NeoTreeDirectoryName",{ fg = m.fg_path, bg = m.bg})
    hl(0,"NeoTreeDirectoryIcon",{ fg = m.fg, bg = m.bg})
    hl(0,"NeoTreeCursorLine",{bg = m.bg_cursorline})

    hl(0,"CursorLine",{bg = m.bg_cursorline})
    hl(0,"CursorColumn",{bg = m.bg_cursorline})

    hl(0,"WinSeparator",{bg = m.bg, fg = m.bg_cursorline})
    hl(0,"Visual",{bg = m.bg_visual, fg = m.fg_visual})
    hl(0,"Cursor",{bg = m.bg_cursor})
    hl(0,"LineNr",{fg = m.fg_line_number})

    hl(0,"WinBar",{fg = m.fg,bg = m.bg})
    hl(0,"WinBarNC",{fg = m.fg,bg = m.bg})

    -- spectre
    hl(0,"DiffAdd",{fg = m.red_deep, bg=m.bg})
    hl(0,"DiffText",{fg = m.fg, bg=m.bg})
    hl(0,"DiffChange",{bg = m.red ,fg = m.bg})
    hl(0,"DiffDelete",{bg = m.fg, fg = m.bg})

    hl(0,"diffAdded",{fg = m.red_deep, bg=m.bg}) --used by telescope undo history
    hl(0,"diffRemoved",{fg = m.fg, bg=m.bg})

    --selector
    hl(0,"AlphabetLabel",{fg = m.bg_search})
    hl(0,"AlphabetPath",{fg = m.fg_path})

    --heir
    hl(0,"HeirlinePath",{fg = m.fg_path, bg = m.bg_cursorline})
    hl(0,"HeirlineFileName",{fg = m.yellow_dark, bg = m.bg_cursorline})

    --notify
    hl(0,"NotifyINFOBorder",{fg=m.red})
    hl(0,"NotifyERRORBorder",{fg=m.red})
    hl(0,"NotifyWARNBorder",{fg=m.red})
    hl(0,"NotifyINFOBorder",{fg=m.red})
    hl(0,"NotifyDEBUGBorder",{fg=m.red})
    hl(0,"NotifyTRACEBorder",{fg=m.red})

    hl(0,"NotifyERRORIcon",{fg=m.red})
    hl(0,"NotifyWARNIcon",{fg=m.red})
    hl(0,"NotifyINFOIcon",{fg=m.red})
    hl(0,"NotifyDEBUGIcon",{fg=m.red})
    hl(0,"NotifyTRACEIcon",{fg=m.red})

    -- hl(0,"NotifyERRORTitle",{fg=m.red})
    -- hl(0,"NotifyWARNTitle",{fg=m.red})
    -- hl(0,"NotifyINFOTitle",{fg=m.red})
    -- hl(0,"NotifyDEBUGTitle",{fg=m.red})
    -- hl(0,"NotifyTRACETitle",{fg=m.red})

    -- eyeliner
    hl(0, 'EyelinerPrimary', { fg='#a05703',bold = true, underline = true })
    hl(0, 'EyelinerSecondary', { fg='#a05703', underline = true })

    -- float
    hl(0,"FloatTitle",{bg = m.bg_cursorline,fg = m.fg_1})
    hl(0,"FloatBorder",{bg = m.bg_cursorline ,fg = m.bg_cursorline})
    hl(0,"NormalFloat",{ bg = m.bg, fg = m.fg})

    -- which-key.nvim highlights
    hl(0, "WhichKey", { fg = m.blue_light })
    hl(0, "WhichKeyGroup", { fg = m.red })
    hl(0, "WhichKeyDesc", { fg = m.fg_1 })
    hl(0, "WhichKeyNormal", {bg = m.bg_cursorline,fg = m.fg_1})

    --betterTerm tab
    hl(0,"BetterTermActive",{bg = m.bg, fg=m.fg})
    hl(0,"BetterTermSymbol",{bg = m.bg_cursorline,fg = m.fg})

    --context
    hl(0,"TreesitterContext",{bg = m.bg_context})

    --flash and search
    hl(0,"FlashBackdrop",{bg = m.bg_seach_backdrop, fg = m.fg_seach_backdrop})
    hl(0,"FlashLabel",{bg = m.bg_search, fg = m.fg_search})
    hl(0,"IncSearch",{bg = m.bg_search, fg = m.fg_search, reverse = true})
    hl(0,"Search",{bg = m.bg_search, fg = m.fg_search, reverse = true})
    hl(0,"CurSearch",{bg = m.bg_cursearch, fg = m.fg_cursearch})

    --starify
    hl(0,"Startify",{fg = m.fg_startify})
    hl(0,"SpecialComment",{fg = m.red}) --cwd title
    hl(0,"Number",{fg = m.fg_startify})
    hl(0,"Operator",{fg = m.bg}) --hide it

    -- blink
    hl(0, "Pmenu", { bg = m.bg_cursorline })
    hl(0, "BlinkCmpMenuSelection", {bg = m.bg})
    hl(0, "BlinkCmpLabel", {fg = m.fg_cmp})
    hl(0, "BlinkCmpSource", {fg = m.fg_cmp})

    -- minuet
    hl(0, "MinuetVirtualText", {fg = m.fg_cmp})

    --misc
    hl(0,"DiagnosticError",{fg = m.red_deep})
    hl(0,"MatchParen",{bg = m.bg_match})
    hl(0,"ErrorMsg",{fg = m.red_deep})
    hl(0,"WarnMsg",{fg = m.yellow_dark})
    hl(0,"MsgArea",{fg = m.red})
    hl(0,"QuickFixLine",{fg = m.red})
    hl(0,"String",{fg = m.fg})
    hl(0,"Keyword",{fg = m.fg})
    hl(0,"Question",{fg = m.fg})

end

return M
-- EOP
